<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<html>
<head>
    <title>岗位列表</title>
   <%@include file="/jsp/public/header.jsp" %>
</head>
<body>

<div id="Title_bar">
    <div id="Title_bar_Head"> 
        <div id="Title_Head"></div>
        <div id="Title"><!--页面标题-->
            <img border="0" width="13" height="13" src="${pageContext.request.contextPath}/style/images/title_arrow.gif"/> 用户管理
        </div>
        <div id="Title_End"></div>
    </div>
</div>

<div id="MainArea">
    <table cellspacing="0" cellpadding="0" class="TableStyle">
       
        <!-- 表头-->
        <thead>
            <tr align=center valign=middle id=TableTitle>
                <td width="100">登录名</td>
                <td width="100">姓名</td>
                <td width="100">所属部门</td>
                <td width="200">岗位</td>
                <td>备注</td>
                <td>相关操作</td>
            </tr>
        </thead>
        
        <!--显示数据列表-->
        <tbody id="TableData" class="dataContainer" datakey="userList">
        	<c:forEach items="${userList}" var="u">
	            <tr class="TableDetail1 template">
	                <td>${u.loginName}&nbsp;</td>
	                <td>${u.name}&nbsp;</td>
	                <td>${u.department.name}&nbsp;</td>
	                <td>
	                	<c:forEach items="${u.roles}" var="r">
	                		${r.name }&nbsp;
	                	</c:forEach>
	                &nbsp;</td>
	                <td>${u.description}&nbsp;</td>
	                <td>
                        <c:if test="${fn:contains(loginUser.privilegeNames,'用户删除') || loginUser.loginName=='admin'}">
	                	<a onclick="return window.confirm('确定删除当前记录吗？')" href="delete.do?uid=${u.uid}" namespace="/">删除</a>
                        </c:if>
                        <c:if test="${fn:contains(loginUser.privilegeNames,'用户修改') || loginUser.loginName=='admin'}">
	                    <a href="editUI.do?uid=${u.uid}" >修改</a>
                        </c:if>
                        <c:if test="${fn:contains(loginUser.privilegeNames,'用户初始化密码') || loginUser.loginName=='admin'}">
						<a href="initPwd.do?uid=${u.uid}" onclick="return window.confirm('您确定要初始化密码为123456吗？')">初始化密码</a>
                        </c:if>
	                </td>
	            </tr>
        	</c:forEach>
        </tbody>
    </table>
    
    <!-- 其他功能超链接 -->
    <div id="TableTail">
<c:if test="${fn:contains(loginUser.privilegeNames,'用户添加') || loginUser.loginName=='admin'}">
        <div id="TableTail_inside">
            <a href="addUI.do" ><img src="${pageContext.request.contextPath}/style/images/createNew.png" /></a>
        </div>
</c:if>
    </div>
    <!--分页信息-->
    <%@include file="/jsp/public/pageView.jsp" %>
</div>

</body>
</html>


